package com.example.javabasic.elasticsearch.booksearch.service;

import com.example.javabasic.elasticsearch.booksearch.EsClient;
import org.elasticsearch.action.admin.indices.get.GetIndexRequest;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * @description es 查询方法
 * @Author Lin FuYuan
 * @date 2021/6/16
 */
public class EsService {

    private RestHighLevelClient client = new EsClient().client();

    public Boolean existIndex(String index){
        return false;
    }

    public void add(){
        // 文档 Document Id
        IndexRequest request = new IndexRequest( "bookindex",  "book");

    System.out.print("sds");
        System.out.println("aaaaa");
        System.out.println(12345);
    }
}
